package com.bff.gaia.mix.api.xjoin2.core.table;

import com.bff.gaia.mix.api.xjoin2.core.enums.AsyncXjoinCacheType;
import com.bff.gaia.mix.api.xjoin2.core.enums.XjoinType;

import java.io.Serializable;

public class JoinInfo implements Serializable {

	private static final long serialVersionUID = -1L;

	public static final String CACHE_KEY = "cache";

	public static final String CACHE_SIZE_KEY = "cacheSize";

	public static final String CACHE_TTLMS_KEY = "cacheTTLMs";

	public static final String PARTITIONED_JOIN_KEY = "partitionedJoin";

	private String streamTableName;

	private String sideTableName;

	private XjoinType xjoinType;

	private AsyncXjoinCacheType AsyncCacheType = AsyncXjoinCacheType.NONE;//None or LRU or ALL

	private int cacheSize = 10000;

	private long cacheTimeout = 60 * 1000;//

	private boolean partitionedJoin = false;

	private boolean incLog=false;

	private int parallelism=3;

	private int asyncCapacity = 100;

	public AsyncXjoinCacheType getAsyncCacheType() {
		return AsyncCacheType;
	}

	public void setAsyncCacheType(AsyncXjoinCacheType asyncCacheType) {
		this.AsyncCacheType = asyncCacheType;
	}

	public int getCacheSize() {
		return cacheSize;
	}

	public void setCacheSize(int cacheSize) {
		this.cacheSize = cacheSize;
	}

	public long getCacheTimeout() {
		return cacheTimeout;
	}

	public void setCacheTimeout(long cacheTimeout) {
		this.cacheTimeout = cacheTimeout;
	}

	public boolean isPartitionedJoin() {
		return partitionedJoin;
	}

	public void setPartitionedJoin(boolean partitionedJoin) {
		this.partitionedJoin = partitionedJoin;
	}

	public int getAsyncCapacity() {
		return asyncCapacity;
	}

	public void setAsyncCapacity(int asyncCapacity) {
		this.asyncCapacity = asyncCapacity;
	}

	public String getStreamTableName() {
		return streamTableName;
	}

	public void setStreamTableName(String streamTableName) {
		this.streamTableName = streamTableName;
	}

	public String getSideTableName() {
		return sideTableName;
	}

	public void setSideTableName(String sideTableName) {
		this.sideTableName = sideTableName;
	}

	public XjoinType getXjoinType() {
		return xjoinType;
	}

	public void setXjoinType(XjoinType xjoinType) {
		this.xjoinType = xjoinType;
	}

	public boolean isIncLog() {
		return incLog;
	}

	public void setIncLog(boolean incLog) {
		this.incLog = incLog;
	}

	public int getParallelism() {
		return parallelism;
	}

	public void setParallelism(int parallelism) {
		this.parallelism = parallelism;
	}
}